//
// Created by wk on 2024/1/2.
//

#ifndef FILEENCRYPTUTILS_ENCRYPTTYPEH265_H
#define FILEENCRYPTUTILS_ENCRYPTTYPEH265_H

#include "EncryptInterface.h"




enum {
    KEY_BYTES = 2048,
    SH265_FLAG = (((off32_u) 'S') << 24) | (((off32_u) '2') << 16) | (((off32_u) '6') << 8) | '5'
};
typedef struct SH265Header_tag // total 4k bytes
{
    off32_u sig;
    off32_u mask;
    off64_t file_size;
    off32_u block_bytes;
    off32_u block_base;
    unsigned char rsved[1000 + 1024];
    unsigned char keys[KEY_BYTES];
} SH265Header;

class EncryptTypeH265 : public IDecryptType {
public:
    EncryptTypeH265();

    virtual ~EncryptTypeH265();

    virtual bool isEncryptType(FILE *inputFile);

    int isH265Encrypt(char *buf, int size);

private:

    char preLoadBuffer[16] = {0};
};



#endif //FILEENCRYPTUTILS_ENCRYPTTYPEH265_H
